<style>
	.feature {
		padding: 30px 0;
	}
</style>
<div class="panel panel-default" ng-controller="RentModuleCtrl">
	<div class="panel-heading">城际约租 / 模块配置</div>
	<div class="panel-body">
		<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
		<div class="tab-content" ng-init="stats={order:true,time:false,points:false,protocol:false,rule:false,info:false}">
			<ul class="nav nav-tabs">
				<li ng-class="{active:stats.order}"><a href role="tab" data-toggle="tab" ng-click="stats.time=false;stats.points=false;stats.protocol=false;stats.order=true;stats.ins=false;stats.rule=false;stats.info=false">约租下单配置</a>
				</li>
				<li ng-class="{active:stats.time}"><a href role="tab" data-toggle="tab" ng-click="stats.time=true;stats.points=false;stats.protocol=false;stats.order=false;stats.ins=false;stats.rule=false;stats.info=false">定时配置</a>
				</li>
				<li ng-class="{active:stats.points}"><a href role="tab" data-toggle="tab" ng-click="stats.time=false;stats.points=true;stats.protocol=false;stats.order=false;stats.ins=false;stats.rule=false;stats.info=false">积分配置</a>
				</li>
				<li ng-class="{active:stats.rule}"><a href role="tab" data-toggle="tab" ng-click="stats.time=false;stats.points=false;stats.protocol=false;stats.order=false;stats.ins=false;stats.rule=true;stats.info=false">退款手续费配置</a>
				</li>
				<li ng-class="{active:stats.protocol}"><a href role="tab" data-toggle="tab" ng-click="stats.time=false;stats.points=false;stats.protocol=true;stats.order=false;stats.ins=false;stats.rule=false;stats.info=false">约租服务协议</a>
				</li>
				<li ng-class="{active:stats.ins}"><a href role="tab" data-toggle="tab" ng-click="stats.time=false;stats.points=false;stats.protocol=false;stats.order=false;stats.ins=true;stats.rule=false;stats.info=false">约租保险协议</a>
				</li>
				<li ng-class="{active:stats.info}"><a href role="tab" data-toggle="tab" ng-click="stats.time=false;stats.points=false;stats.protocol=false;stats.order=false;stats.ins=false;stats.rule=false;stats.info=true">约租温馨提示</a>
				</li>
			</ul>

			<div class="tab-pane active" id="tab-points" ng-show="stats.order">
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(days)" ng-disabled="mailForm.$invalid" has-authority="RENT_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(days)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{days.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="days.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">天</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="days.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">天</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 说明： </label>
								<div class="col-md-7">
									<p>下单限制从包含当天开始的X天，X为此处配置天数。</p>
									<p>如配置天数为15天，1月1日下单，只能选择1月1日到1月15日的班次。</p>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!-- 下单日期配置end -->
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(times)" ng-disabled="mailForm.$invalid" has-authority="RENT_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(times)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{times.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="times.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="times.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 说明： </label>
								<div class="col-md-7">
									<p>下单限制只能选择当前时间X分钟以后的班次，X为此处配置分钟。</p>
									<p>如配置时间为60分钟，1月1日8：00下单，选择班次时间从1月1日9：00开始。</p>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!-- 下单时间配置end -->

				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(limit)" ng-disabled="mailForm.$invalid" has-authority="RENT_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(limit)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{limit.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="limit.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">人</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="limit.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">人</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 说明： </label>
								<div class="col-md-7">
									<p>限制相邻的两个时间段的最大用车人数，避免预约用车时间过于集中。</p>
									<p>设置为0则不做限制。</p>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!-- 订单预约限制end -->

				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(pay)" ng-disabled="mailForm.$invalid" has-authority="RENT_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(pay)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{pay.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="pay.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="pay.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
						</form>
					</div>
				</div>
				<!-- 支付超时配置end -->
			</div>


			<div class="tab-pane active" id="tab-points" ng-show="stats.points">
				<div class="row feature">
					<div class="col-md-12">
						<form name="pointForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(points)" ng-disabled="mailForm.$invalid" has-authority="RENT_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(points)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 当前积分比率： </label>
								<div class="col-md-4">
									<input type="text" ng-model="points.value" class="form-control" ng-pattern="/^\d+(\.\d+)?$/" ng-maxlength="3" required>
								</div>
								<label style="margin-top: 6px">%</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="points.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">%</label>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 积分配置end -->

			<div class="tab-pane active" id="tab-shift" ng-show="stats.time">
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(advance)" ng-disabled="mailForm.$invalid" has-authority="RENT_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(advance)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{advance.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="advance.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="advance.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
						</form>
					</div>
				</div>
				<!-- 提前排班时间end -->
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(time)" ng-disabled="mailForm.$invalid" has-authority="RENT_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(time)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{time.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="time.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="time.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
						</form>
					</div>
				</div>
				<!-- 排班时间段end -->
			</div>
			<!-- 定时配置end -->

			<div class="tab-pane active" id="tab-protocol" ng-show="stats.protocol">
				<div class="row feature">
					<div class="col-md-12">
						<form name="orderRefundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(protocol)" has-authority="BOOKING_MODULE_UPDATE">保存修改</button>
									<!-- <button type="button" class="btn btn-primary" ng-click="reset(refund)">恢复默认设置</button> -->
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> {{protocol.description}}： </label>
								<div class="col-md-9">
									<textarea class="form-control" rows="20" ng-minlength="15" ng-maxlength="2000" ng-model="protocol.value" style="resize: none" required></textarea>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 乘车协议end -->

			<div class="tab-pane active" id="tab-protocol" ng-show="stats.ins">
				<div class="row feature">
					<div class="col-md-12">
						<form name="orderRefundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(ins)" has-authority="BOOKING_MODULE_UPDATE">保存修改</button>
									<!-- <button type="button" class="btn btn-primary" ng-click="reset(refund)">恢复默认设置</button> -->
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> {{ins.description}}： </label>
								<div class="col-md-9">
									<textarea class="form-control" rows="20" ng-maxlength="2000" ng-model="ins.value" style="resize: none" required></textarea>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 保险协议end -->


			<div class="tab-pane active" id="tab-points" ng-show="stats.rule">
				<div class="row feature">
					<div class="col-md-12">
						<form name="pointForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(rule)" ng-disabled="mailForm.$invalid" has-authority="RENT_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(rule)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> {{rule.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="rule.value" class="form-control" ng-pattern="/^\d+(\.\d+)?$/" ng-maxlength="3" required>
								</div>
								<label style="margin-top: 6px">%</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="rule.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">%</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 说明： </label>
								<div class="col-md-7">
									<p style="margin-top: 7px">保险费用不受此配置影响，全额退款。</p>

								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 退款手续费end -->

			<div class="tab-pane active" id="tab-protocol" ng-show="stats.info">
				<div class="row feature">
					<div class="col-md-12">
						<form name="orderRefundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(info)" has-authority="BOOKING_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(info)" has-authority="RENT_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> {{info.description}}： </label>
								<div class="col-md-4">
									<textarea class="form-control" rows="5" ng-maxlength="45" ng-model="info.value" style="resize: none" required></textarea>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 约租温馨提示end -->
		</div>
		<!-- tab-content -->
	</div>
	<!-- panel-body -->
</div>
<!-- panel -->